
import { Outlet } from "react-router"
import { Tabs } from 'antd';
import React, { useEffect, useState } from 'react';
import { useNavigate } from "react-router";
import './index.scss'
const App = () => {
    const navigate=useNavigate()
    const [activeKey,setactiveKsy]=useState('/setup/userinfo')
    const onChange = (key) => {
        setactiveKsy(key)
        navigate(key)
    };
    const items = [
        {
            key: '/setup/userinfo',
            label: '个人资料',
        },
        {
            key: "/setup/security",
            label: "安全中心",
        },
        {
            key: "/setup/aboutus",
            label:'关于我们',
        },
    ];
    return (
        <div className="setupBox">
            <div>设置</div>
            <Tabs activeKey={activeKey} items={items} onChange={onChange} />
            <Outlet />
        </div>
    )
}
export default App;